﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.QualityAnalysis.RFormEntity
{
    public class R电缆剥线试验记录表高频 : RTableBase
    {
        public R电缆剥线试验记录表高频(int serialNum, Guid rWorkStepEntityId, Guid rProcessesEntityId, int sort, string fisrtDrawingNum, string toolUsed, string secondToolUsed, string recordItem,string recordRemark)
        {
            SerialNum = serialNum;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            Sort = sort;
            FisrtDrawingNum = fisrtDrawingNum;
            ToolUsed = toolUsed;
            SecondToolUsed = secondToolUsed;
            RecordItem = recordItem;
            RecordRemark = recordRemark;
        }
        public override string FormName { get; protected set; } = "电缆剥线试验记录表高频";
        #region A4_图号
        public override string FisrtDrawingNum_DisplayName { get; protected set; } = "图号";
       
        #endregion
        #region 测量工具编号
        public override string ToolUsed_DisplayName { get; protected set; } = "测量工具编号";
   
        #endregion
        #region A15_剥线钳编号
        public override string SecondToolUsed_DisplayName { get; protected set; } = "剥线钳编号";
   
        #endregion
        #region A11_记录项目

        public override string RecordItem_DisplayName { get; protected set; } = "记录要求";

     

        #endregion
        /// <summary>
        /// 记录要求
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="recordLocation">导线编号</param> 
        /// <returns></returns>
        public RRecordRequirementsEntity SetRecordRequirements(RRecordRequirementsEntity entity, string recordLocation)
        {
            entity.SetRecordLocation(recordLocation, "输出接口点号");

            return entity;
        }
        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="firstMeasuredValues"></param>
        /// <param name="secondMeasuredValues"></param>
        /// <param name="thirdMeasuredValues"></param>
        /// <param name="confirmResult"></param>
        /// <returns></returns>
        public RMeasuredResultEntity SetMeasuredResult(RMeasuredResultEntity entity, string secondMeasuredValues, string confirmResult)
        {
            entity.SetSecondMeasuredValues(secondMeasuredValues, "实测值");
            entity.SetConfirmResult(confirmResult, "检查结果");

            return entity;
        }
        /// <summary>
        /// 多媒体
        /// </summary>
        /// <param name="measuredValues"></param>
        public RMultiMediaEntity SetMultiMedia(RMultiMediaEntity entity, string photoNo)
        {
            entity.SetMultiMedia(photoNo, "多媒体");
            return entity;
        }
        /// <summary>
        /// 确认人
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public RInspectionSignatureEntity SetInspectionSignature(RInspectionSignatureEntity entity, string firstOperator, DateTime? firstOperatorTime, string secondOperator, DateTime? secondOperatorTime)
        {
            entity.InspectionSignatureName = "二检";
            entity.SetFirstOperator(firstOperator, "记录人", firstOperatorTime, "记录人操作时间" );
            entity.SetSecondOperator(secondOperator, "确认人", secondOperatorTime, "确认人操作时间");

            return entity;
        }

    }
}
